<template>
  <div class="notice-wrap">
    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="20%" class="message-form">
      <el-form-item label="通知范围:" prop="groupId">
        <el-select v-model="ruleForm.groupId" multiple collapse-tags placeholder="请选择范围(可多选)">
          <el-option
            v-for="item in group"
            :key="item.id"
            :label="item.name"
            :value="item.id"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="通知内容:" prop="content">
        <el-input
          v-model="ruleForm.content"
          resize="none"
          type="textarea"
          :rows="5"
          placeholder="请输入内容"
        />
      </el-form-item>

      <el-form-item label="操作密码:" prop="password">
        <el-input
          v-model="ruleForm.password"
          show-password
        />
      </el-form-item>

      <div class="btns flex-center" @click="submitForm('ruleForm')">
        <span>
          一键广播
        </span>
      </div>
    </el-form>
  </div>
</template>

<script>

export default {
    name: '',
    components: {},
    data() {
        return {
            ruleForm: {
                groupId: [],
                content: '',
                password: ''
            },
            group: [],
            rules: {
                content: [
                    { required: true, message: '请输入通知内容', trigger: 'blur' },
                    { min: 3, max: 150, message: '长度在 3 到 150 个字符', trigger: 'blur' }
                ],
                password: [
                    { required: true, message: '请填写操作密码', trigger: 'blur' }
                ],
                groupId: [
                    { required: true, message: '请选择范围' }
                ]

            }
        }
    },
    computed: {},
    created() {
        this.getList()
    },
    methods: {
        async getList() {

        },
        submitForm(formName) {

        }
    }
}
</script>
<style>

</style>
<style lang='scss' scoped>

.label{
    min-width: 110px;
    text-align: right;
    margin-right: 15px;
    align-self: flex-start;
}
.btn{
    width: 100px;
    text-align: center;
    color: #00C8FF;
}
.item{
    margin-bottom: 30px;
}
.notice-wrap{
    padding: 10px;
    color: #B4B4B4;
}
.polygonBox{
    min-height: 70px;
    padding: 10px;
      --polygonBorderColor: rgba(0, 200, 255, 0.5);
  --polygonBgColor: transparent;
}
.polygonBox-msg{
min-height: 150px;
}
.btns{
    span{
        height: 30px;
        line-height: 30px;
        padding: 0 15px;
        letter-spacing: 2px;
        background-image: url('~@/assets/img/btnBg.png');
        background-size: 100% 100%;
        cursor: pointer;
    }
}
</style>
